<?
function SelectTemplate(&$smarty,$template)
{
if($smarty->template_exists("custom/" . $template) )
{
    $temp = "custom/" . $template;
}
else
{
	$temp = $template;
}

return $temp;

}

?>